package cn.itsource.system.mapper;


import cn.itsource.org.domain.User;
import cn.itsource.system.domain.Permission;
import cn.itsource.system.query.PermissionQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author DELL
* @description 针对表【tb_permission】的数据库操作Mapper
* @createDate 2024-06-12 15:43:54
* @Entity cn.itsource.article.domain.Permission
*/
public interface PermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);


    List<Permission> selectAllByQuery(PermissionQuery permissionQuery);

    void deleteByConllection(List<Permission> permissions);

    List<Permission> seletAll();

    Permission getByName(String name);


    List<Permission> selectByLoginId(Long id);

    /**
     * 根据请求方式和uri查询permission
     * @param methodType
     * @param uri
     * @return
     */
    Permission selectByMethodTypeAndUri(@Param("methodType") String methodType, @Param("uri") String uri);
}
